/*
 * @Author       : NaN 353362604@qq.com
 * @Date         : 2023-08-03 15:41:21
 * @LastEditTime : 2023-08-18 11:16:53
 * @LastEditors  : NaN 353362604@qq.com
 * @FilePath     : \AdminStration\src\Pages\Front\jtgj\Page.jsx
 * @Description  :
 */
import { useEffect, useState } from 'react'
import { useLocation } from 'react-router-dom'

import { OneOne } from './Templates/OneOne'
import { ThrOne } from './Templates/ThrOne'
import { ThrTwo } from './Templates/ThrTwo'
import { ThrThr } from './Templates/ThrThr'
import { ThrFou } from './Templates/ThrFou'

import { FouOne } from './Templates/FouOne'
import { FouTwo } from './Templates/FouTwo'
import { FouThr } from './Templates/FouThr'
import { FouFou } from './Templates/FouFou'

import { FivOne } from './Templates/FivOne'

import { SevOne } from './Templates/SevOne'
import { TenOne } from './Templates/TenOne'

import { TwoA01 } from './Other/TwoA01'
import { ThrA01 } from './Other/ThrA01'
import { FivA01 } from './Other/FivA01'

import { SixTwo } from './Templates/SixTwo'
import { SixThr } from './Templates/SixThr'
import { SixFou } from './Templates/SixFou'
import { SixFiv } from './Templates/SixFiv'

import { EigOne } from './Templates/EigOne'
import { NinOne } from './Templates/NinOne'

import { FouA01 } from './Templates/FouA01'
import { FouA02 } from './Templates/FouA02'

const Page = () => {
    const { pathname } = useLocation()
    const [currentPath, setCurrentPath] = useState()
    useEffect(() => setCurrentPath(pathname.split('/').at(-1)), [pathname])
    return (
        <div className={`Page ${currentPath}`}>
            {(() => {
                switch (currentPath) {
                    case 'OneOne':
                        return <OneOne />
                    case 'TwoOne':
                        return <TwoA01 />
                    case 'ThrOne':
                        return <ThrOne />
                    case 'ThrTwo':
                        return <ThrTwo />
                    case 'ThrThr':
                        return <ThrThr />
                    case 'ThrFou':
                        return <ThrFou />
                    case 'FouOne':
                        return <FouOne />
                    case 'FouTwo':
                        return <FouTwo />
                    case 'FouThr':
                        return <FouThr />
                    case 'FouFou':
                        return <FouFou />
                    case 'FivOne':
                        return <FivOne />
                    case 'SixOne':
                        return <ThrA01 />
                    case 'SixTwo':
                        return <SixTwo />
                    case 'SixThr':
                        return <SixThr />
                    case 'SixFou':
                        return <SixFou />
                    case 'SixFiv':
                        return <SixFiv />
                    case 'SevOne':
                        return <SevOne />
                    case 'EigOne':
                        return <EigOne />
                    case 'NinOne':
                        return <NinOne />
                    case 'TenOne':
                        return <FivA01 />
                    case 'FouA01':
                        return <FouA01 />
                    case 'FouA02':
                        return <FouA02 />
                    default:
                        return <div>未知页面</div>
                }
            })()}
        </div>
    )
}

export default Page
